<?xml version='1.0' encoding='UTF-8' ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/WEB-INF/templates/principal.xhtml">
	<ui:define name="conteudo">
		<h:form>
			<p:panel id="panel"
				header="Informe os campos abaixo para salvar o registro ( * Obrigatórios ): "
				style="margin-bottom:10px;">
				<p:messages id="messages" />
				<h:panelGrid columns="2" cellpadding="10">
					
					<h:outputLabel for="email" value="Email: *" />
					<p:inputText id="email" value="#{usuarioController.usuario.email}"
						label="Email" size="40" />
					<h:outputLabel for="login" value="Login: *" />
					<p:inputText id="login" value="#{usuarioController.usuario.login}"
						label="Login" />
					<h:outputLabel for="senha" value="Senha: *" />
					<p:password id="senha" value="#{usuarioController.usuario.senha}"
						label="Senha" />
					<h:outputLabel for="tipo" value="Tipo de usuário:"></h:outputLabel>
					<p:selectOneMenu id="tipo" value="#{usuarioController.usuario.tipo}">
						<f:selectItem itemLabel="Empresa" itemValue="e"></f:selectItem>
						<f:selectItem itemLabel="Candidato" itemValue="c"></f:selectItem>
					</p:selectOneMenu>
					<p:commandButton value="Inserir" id="btInserir"
						action="#{usuarioController.cadastrarUsuario}" update="panel" />
				</h:panelGrid>
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>
</html>